package cn.jdw.shop.utils;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/util")
public class DateController {

    @PostMapping("/date")
    public Map test(@RequestBody DateBody dateBody) {
        Map<String, Object> result = new HashMap<>();
        result.put("date", dateBody);
        result.put("差补", dateBody.num1());
        result.put("阶梯", dateBody.num2());
        return result;
    }
}
